package com.gulimall.cart.config;

import com.gulimall.cart.interceptor.CartInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: Ren(任佳宝)
 * @Description: GulimallWebConfig
 * @Date: 2025/2/10 下午12:26
 * @Version: 1.0
 */


@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(new CartInterceptor())
                .addPathPatterns("/**");
    }
}
